<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<%@include file="../../commons/meta.jsp"%>
<link rel="stylesheet" href="${ctx}assets/plugins/pure/pure-min.css" media="all" />
<script type="text/javascript" src="${ctx}assets/plugins/plupload/2.2.1/js/plupload.full.min.js"></script>
<script type="text/javascript" src="${ctx}assets/plugins/plupload/2.2.1/js/i18n/zh_CN.js"></script>
<script type="text/javascript">
function validateForm() {
  if (empty($("#tableName").val())) {
    alertError('请输入表名称！');
    return false;
  }
  if (empty($("#columnName").val())) {
    alertError('请输入字段名！');
    return false;
  }
  if (empty($("#columnValue").val())) {
    alertError('请输入字段值！');
    return false;
  }
  if (empty($("#valueMean").val())) {
    alertError('请输入值含义！');
    return false;
  }
  $("#forms").submit();
}
  //  关闭弹出框 
  jQuery(document).ready(function() {
    $("#back_btn").click(function() {
      window.location.href = "${ctx}api/table-column-dic/"
    });
  });
</script>
</head>
<body>
    <%@include file="../../commons/head.jsp"%>
    <div class="content">
        <%@include file="../../commons/menu.jsp"%>
        <!--右侧展示部分-->
        <div class="right-zq">
            <!--center content-->
            <div class="dynamic">
                <div class="role dynamiclayer" style="display: block;">
                    <div class="title orange2">
                        <span class="left">系统管理</span> <label> > </label> <span>字典管理</span> <label> > </label> <span>修改</span>
                    </div>
                    <form class="" id="forms" method="post" action="${ctx}api/table-column-dic/update">
                        <div class="news-table">
                            <table>
                                <tr>
                                    <td class="item">表名称:</td>
                                    <td width="40%"><input class="p100" id="tableName" name="tableName" type="text" value="${obj.tableName}" /></td>
                                </tr>
                                <tr>
                                    <td class="item">字段名:</td>
                                    <td width="40%"><input class="p100" id="columnName" name="columnName" type="text" value="${obj.columnName}" /></td>
                                </tr>
                                <tr>
                                    <td class="item">字段值:</td>
                                    <td width="40%"><input class="p100" id="columnValue" name="columnValue" type="text" value="${obj.columnValue}" /></td>
                                </tr>
                                <tr>
                                    <td class="item">值含义:</td>
                                    <td width="40%"><input class="p100" id="valueMean" name="valueMean" type="text" value="${obj.valueMean}" /></td>
                                </tr>
                                <tr>
                                    <td class="item">描述:</td>
                                    <td width="40%"><input class="p100" id="description" name="description" type="text" placeholder="请输入描述" value="${obj.description}" /></td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="hidden" name="id" value="${obj.id}" />
                                    </td>
                                    <td>
                                        <button class="orange2" type="button" onclick="validateForm()">保存&nbsp;<i class="fa fa-floppy-o"></i>
                                        </button> &nbsp;&nbsp;
                                        <button class="orange2" type="button" id="back_btn">返回&nbsp;<i class="fa fa-undo"></i>
                                        </button>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </form>
                </div>
            </div>
            <!--center content over-->
        </div>
    </div>
    <%@include file="../../commons/footpop.jsp"%>
    <!-- 页尾，提示消息 -->
    <jsp:include page="../../commons/foot_message.jsp"></jsp:include>
</body>
</html>
